package cn.topevery.garden.dal.dao;

import cn.topevery.garden.entity.po.EvaluationRules;
import cn.topevery.garden.entity.query.EvaluationRulesQuery;
import cn.topevery.garden.entity.vo.EvaluationRulesVO;
import cn.topevery.garden.entity.vo.EvaluationTableVO;
import cn.topevery.garden.entity.vo.EvaluationTreeVO;
import cn.topevery.garden.framework.base.BaseDao;
import hw.topevery.framework.db.entity.DataPager;

import java.util.List;
import java.util.Map;

/**
 * 检查考评规则表
 *
 * @author code-generate
 * @date 2022-01-05
 */
public interface EvaluationRulesDao extends BaseDao<EvaluationRules> {

    

    /**
     * 获取列表
     *
     * @param query
     */
    DataPager<EvaluationRulesVO> listPage(EvaluationRulesQuery query);

    EvaluationRules getEntityByColumn(String key,String value);

    List<EvaluationRules> getRootList();

    List<EvaluationRules> getListByPid(String pid);

    void deleteByRuleId(String ruleId, Integer layer, Integer userId);

    EvaluationRules getByRuleId(String ruleId);

    void updateItemScore( String ruleId, Double totalScore);

    List<EvaluationTableVO> getEvaluationTable(Map<String, Object> map);

    List<EvaluationTreeVO> getEvaluationTreeForMobile(Map<String, String> map);

    List<Map<String, Object>> getStatisticsTable(Map<String, Object> map);

    List<Map<String, Object>> getTotalScoreList();

    List<Map<String, Object>> getStatisticsFormalTableByTableId(Integer tableId);

    List<EvaluationTableVO> getReportedEvaluationTable(Map<String, Object> map);


}
